Techniques for triggering a block move using a system bus write command initiated by user code

ABSTRACT

A technique for triggering a system bus write command with user code includes identifying a specific store-type instruction in a user instruction sequence. The specific store-type instruction is converted into a specific request-type command, which is configured to include core permission controls (that are stored in core configuration registers of a processor core by a trusted kernel) and user created data (stored in a cache memory). Slave devices are configured through register space (that is only accessible by the trusted kernel) with respective slave permission controls. The specific request-type command is then transmitted from the cache memory, via a system bus. In this case, the slave devices that receive the specific request-type command (via the system bus) process the specific request-type command when the core permission controls are the same as the respective slave permission controls.

This invention was made with United States Government support underAgreement No. HR0011-07-9-0002 awarded by DARPA. The Government hascertain rights in the invention.

BACKGROUND

1. Field

This disclosure relates generally to techniques that allow a user levelinstruction to initiate the movement of a block of data via a system buswrite command and, more specifically, to techniques for performing asystem bus write command while ensuring permission protections by anunderlying operating system.

2. Related Art

In various applications, user programs (user code) may need to builddata structures or packets in system memory to facilitate transmissionof the data structures or packets out of the system memory to aninput/output (I/O) device (e.g., a networked device) or a coprocessor.To transfer data from user code to an I/O device a conventional approachhas: built a packet that includes data at location ‘A’ in a systemmemory; loaded the data from the location ‘A’ in the system memory intogeneral purpose registers (GPRs) of a processor core; and stored thedata in the GPRs to location ‘B’ in the system memory. In general,because a user program works in ‘effective address’ space, a processorcore has been responsible for converting both address ‘A’ and address‘B’ from effective addresses (used by software) to real addresses (usedby hardware) and checking permissions to ensure that the user code(which may correspond to a thread) is allowed to access a page or pagesof the system memory at the addresses ‘A’ and ‘B’. By performing aneffective-to-real address translation and a permission check, ahypervisor has controlled what real address space user code has beenallowed to access. In the case where user code is attempting to send arelatively large amount of packets (to, for example, be transmitted overa network), the conventional approach can greatly limit the number ofpackets that can be built and transmitted in a given amount of time.Moreover, the conventional approach utilizes valuable bandwidth (inmoving data through GPR registers of a processor core) that may beutilized by the processor core to perform other tasks.

SUMMARY

According to one aspect of the present disclosure, a technique fortriggering a system bus write command with user code includesidentifying a specific store-type instruction in a user instructionsequence. The specific store-type instruction is converted into aspecific request-type command, which is configured (by hardware) toinclude core permission controls (that are stored in core configurationregisters of a processor core) and user created data (stored in a cachememory). The specific request-type command is then transmitted from thecache memory, via a system bus. The core permission controls dictatewhether slave devices receiving the specific request-type command (viathe system bus) are able to process the specific request-type command.

According to another aspect of the present disclosure, a processorsystem includes a processor core, a cache memory coupled to theprocessor core and a system bus, and slave devices coupled to the systembus. The processor core and the cache memory are configured to identifya specific store-type instruction in a user instruction sequence andconvert the specific store-type instruction into a specific request-typecommand. The specific request-type command is configured (by hardwareincluded in the processor core and the cache memory) to include corepermission controls (that are stored in core configuration registers ofthe processor core by a trusted kernel) and user created data (stored inthe cache memory). The slave devices are configured through registerspace (that is only accessible by the trusted kernel) with respectiveslave permission controls. The cache memory is configured to transmitthe specific request-type command via the system bus. In this case, theslave devices that receive the specific request-type command (via thesystem bus) process the specific request-type command when the corepermission controls are the same as the respective slave permissioncontrols.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example and is notintended to be limited by the accompanying figures, in which likereferences indicate similar elements. Elements in the figures areillustrated for simplicity and clarity and have not necessarily beendrawn to scale.

FIG. 1 is a diagram of a relevant portion of an example processor systemthat may be configured to implement a processor core and a level-2 (L2)cache memory (cache) according to an embodiment of the presentdisclosure.

FIG. 1A is a block diagram depicting an example processor core and anexample L2 cache configured according to an embodiment of the presentdisclosure.

FIG. 2 is a flowchart of an example process depicting hardware flow forconversion of a data cache block enqueue (DCBQ) instruction to a DCBQrequest (DCBQ_Req) command, according to an embodiment of the presentdisclosure.

FIG. 3 is an example block diagram depicting conversion of a DCBQinstruction to a DCBQ_Req command that is provided to a functional unit(FU), according to an embodiment of the present disclosure.

FIGS. 4A-4B are a flowchart of an example process depicting softwareflow for conversion of a DCBQ instruction to a DCBQ_Req command,according to an embodiment of the present disclosure.

FIG. 5 is a diagram of an example format for a DCBQ_Req command packet.

DETAILED DESCRIPTION

As will be appreciated by one of ordinary skill in the art, the presentinvention may be embodied as a method, system, device, or computerprogram product. Accordingly, the present invention may take the form ofan entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module,” or “system.”For example, the present invention may take the form of one or moredesign files included in a computer program product on a computer-usablestorage medium having computer-usable program code embodied in themedium.

Any suitable computer-usable or computer-readable storage medium may beutilized. The computer-usable or computer-readable storage medium maybe, for example, but is not limited to an electronic, magnetic, optical,electromagnetic, infrared, or semiconductor system, apparatus, ordevice. More specific examples (a non-exhaustive list) of thecomputer-readable storage medium include: a portable computer diskette,a hard disk, a random access memory (RAM), a read-only memory (ROM), anerasable programmable read-only memory (EPROM or Flash memory), aportable compact disc read-only memory (CD-ROM), an optical storagedevice, or a magnetic storage device. The computer-usable orcomputer-readable storage medium could even be paper or another suitablemedium upon which the program is printed, as the program can beelectronically captured, via, for instance, optical scanning of thepaper or other medium, then compiled, interpreted, or otherwiseprocessed in a suitable manner, if necessary, and then stored in acomputer memory. In the context of this disclosure, a computer-usable orcomputer-readable storage medium may be any medium that stores a programfor use by or in connection with an instruction execution system,apparatus, or device. As used herein, the term “coupled” includes both adirect electrical connection between blocks or components and anindirect electrical connection between blocks or components achievedusing one or more intervening blocks or components.

To increase the efficiency for which a user program can send packets, aspecial store-type instruction (which triggers hardware to ‘copy’(write) from real address ‘A’ to a real address ‘B’ while maintainingpermission controls (set by a trusted kernel) to control real memoryspace that the user program is allowed to access) is disclosed. In thiscase, the real address B’ corresponds to a slave device (e.g., acoprocessor, a host fabric interface (HFI), or an HFI that includes anetwork device, a coprocessor, etc.) that is initialized by a trustedkernel to have permission to accept commands from a user thread with agiven permission key. According to this aspect of the presentdisclosure, a system bus protocol is implemented to enable a ‘level-2’(L2) cache memory (cache) to send a command packet on behalf of thespecial store-type instruction and to implement flow control policiesfor the slave device to regulate the rate at which the commands areprocessed. While the discussion herein is directed to an L2 cache, it iscontemplated that the techniques described herein can be implemented ina higher or lower level cache.

According to various aspects of the present disclosure, a data cacheblock enqueue (DCBQ) instruction (e.g., a 4-byte special store-typeinstruction) is implemented to allow user code to trigger a specialsystem bus write command (i.e., a DCBQ request (DCBQ_Req) command). In atypical implementation, when initiated, the DCBQ_Req command is acceptedby a system bus slave device (slave) that is authorized to acceptDCBQ_Req commands from a given user thread. In at least one embodiment,a DCBQ_Req packet includes a full cache-line that is sent to the slaveas part of the DCBQ_Req command. In one or more embodiments, a DCBQ_Reqpacket includes: a ‘permission key’ field (created by, for example,hardware and a trusted kernel to facilitate permission control); a‘memory management’ field that conveys information for the slave in theevent a cache-line payload contains effective addresses (EAs) that needto be converted to real addresses (RAs); a DCBQ transfer type (ttype)field that indicates (to the slave) a DCBQ_Req operation; and a datapayload field (which is, for example, user defined).

A DCBQ_Req command can be used in various manners. For example, aDCBQ_Req command may correspond to a coprocessor packet that includes acontrol block of information that a processor sends to a coprocessor forprocessing (e.g., moving a block of data that starts at address ‘A’ insystem memory to start at address ‘B’ in the system memory) or theDCBQ_Req command may correspond to a network packet that includes anetwork routing header and a payload (Spec_Info) that is to betransmitted across a network connection. In general, implementation of aDCBQ instruction allows user code to efficiently perform an ‘atomiccache-line copy’ from an RA ‘A’ to an RA ‘B’ with a single store-typeinstruction. Typically, implementation of the DCBQ instruction decreaseslatency and overhead associated with transferring a packet and alsoincreases the number of packets that can be built and transmitted in agiven amount of time.

According to various embodiments of the present disclosure, a core and alevel-2 (L2) cache are designed to include hardware that processes auser level DCBQ instruction and builds a DCBQ_Req packet. In at leastone embodiment, the hardware builds four parts of a DCBQ_Req packet fora DCBQ_Req command. For example, a data flow mechanism can be built ontop of an existing store queue buffer and L2 cache machine data flowplumbing to efficiently handle operations associated with buildingpackets. In this manner, user code can efficiently transfer packets to aslave. The packets can then be used as network packets or as controlblocks that can be interpreted by a slave to execute specific desiredtasks. A ‘permission key’ may, for example, be set-up by a trustedkernel (e.g., a hypervisor) and stored in a core on a per-thread basis.

In one or more embodiments, the trusted kernel sets up the permissionkey for both a user thread initiating a DCBQ instruction and a slavethat is designated to receive DCBQ_Req commands from the user thread. Inthis manner, the trusted kernel ensures that a user-initiated DCBQinstruction is only accepted by slaves to which the trusted kernel hasgranted permission. A DCBQ_Req transfer type (ttype) may be, forexample, set-up by user code in a cache-line as part of initiating aDCBQ instruction. A payload of the cache-line may be, for example,set-up prior to user code initiating a DCBQ instruction and, in thiscase, the payload is defined by the user code to be interpreted by agiven slave. As noted above, the payload may take various forms (e.g.,network packets for a network device to forward out on a communicationnetwork, or control blocks for a coprocessor or direct memory access(DMA) engine) and include one or more cache-lines.

A DCBQ instruction may be configured such that user code provides statusinformation back to a core. For example, the DCBQ instruction may causeuser code to provide status information that includes: device ‘accepted’command; device ‘busy’; or device ‘rejected’ command. When the DCBQinstruction is configured to provide status via user code, a user canbuild a low-level form of flow control in sending of DCBQ_Req commands.However, it should be appreciated that configuring a DCBQ instruction tocause user code to provide status information to a core results inreduced core performance, since the completion of a DCBQ instruction istied to completion of the DCBQ instruction on a system bus. A DCBQinstruction may also be configured to not provide status, via user code,to the core or to provide status to a memory address defined in aDCBQ_Req command. In this case, a stream of DCBQ instructions can beinitiated in parallel by an L2 cache to maximize bandwidth for a streamof DCBQ instructions. For example, when a DCBQ instruction is configuredto not provide status directly back to a core, user code can set-up ahigh-level form of flow control with a target device (e.g., a softwarepush/pop counter that is maintained via reading of a target device ‘pop’counter) or rely on system bus ‘retry’ flow control by a slave device.

According to various aspects of the present disclosure, a system busprotocol for a user level DCBQ instruction is disclosed that facilitatessending data packets to a functional unit (e.g., an HFI including one ormore coprocessors and/or one or more network devices). In general, thesystem bus protocol facilitates sending (e.g., by an L2 cache) aDCBQ_Req packet on behalf of the DCBQ instruction, as well as settingflow control policies for a slave to regulate a rate at which DCBQ_Reqcommands are processed. According to another aspect of the presentdisclosure, permission policies and a flow control protocol for a userlevel DCBQ instruction are disclosed that facilitate sending of datapackets to a coprocessor and/or a network device. The permissionmechanism, which may be controlled and set-up by a trusted kernel,enables the DCBQ instruction to be a user level instruction. In variousembodiments, the trusted kernel is configured to ensure that the usercode can only access system bus slaves for which permission waspreviously set-up by the trusted kernel. In this case, the user codecannot access resources for which the user code has not previously beengranted access permission by the trusted kernel.

With reference to FIG. 1, a relevant portion of an example processorsystem 100 is illustrated that may handle I/O operations according toone or more of the techniques disclosed herein. The example processorsystem 100 includes one or more chip-level multiprocessors (CMPs) onlyone of which is illustrated in FIG. 1, each of which may includemultiple (e.g., two to one-hundred processor cores) processors 102. TheCMP may correspond to, for example, a processor node of a computercluster employed in a high performance computing (HPC) application. Theprocessors 102 may, for example, operate in a simultaneousmultithreading (SMT) mode or a single thread (ST) mode. When theprocessors 102 operate in the SMT mode, the processors 102 may employmultiple separate instruction fetch address registers to store programcounters for multiple threads. In at least one embodiment, theprocessors 102 each include a first level (L1) cache memory (notseparately shown in FIG. 1) that is coupled to a shared second level(L2) cache memory (cache) 120, which is coupled to a shared third level(L3) cache 115 and a fabric controller 107.

As is illustrated, the fabric controller 107 is coupled to a memorycontroller (e.g., included in a Northbridge) 109, which is coupled to amemory subsystem 111. The memory subsystem 111 includes an applicationappropriate amount of volatile and non-volatile memory. The fabriccontroller 107 facilitates communication between different CMPs andbetween the processors 102 and the memory subsystem 111 and, in thismanner, functions as an interface. It should be appreciated that thevarious techniques disclosed herein are equally applicable to systemsthat employ separate L2 caches for each processor, as well as systemsthat employ separate L2 and L3 caches for each processor. Each of theL1, L2, and L3 caches may be combined instruction and data caches ordata caches.

As is shown in FIG. 1, the fabric controller 107 is also coupled to anI/O channel controller (e.g., included in a Southbridge) 117, which iscoupled to a host channel adapter (HCA)/switch block 119. The HCA/switchblock 119 includes an HCA and one or more switches that may be utilizedto couple the processors 102 of the CMP to other nodes (e.g., I/Osubsystem nodes and other processor nodes) of a computer cluster.

With reference to FIG. 1A, data may flow into and out of the L2 cache120 (configured according to various embodiments of the presentdisclosure) along a number of different paths. As is shown, the L2 cache120 includes a ‘core store bus’, a ‘core reload bus’, and is coupled toa ‘system bus’, among other buses (not specifically shown). The corestore bus is used to send stores (performed by an associated core 102 toan associated store-through ‘level-1’ (L1) cache) to the L2 cache 120.The core reload bus is used to deliver reload data to the core 102 forcore load requests, along with any invalidates the L2 cache 120 needs tosend to manage L1 caches (not shown in FIG. 1) in the core 102. Thesystem bus is utilized by the L2 cache 120 to receive/move data from/toother caches or main memory. The L2 cache 120 includes (among othercomponents): a store queue buffer 124; a store byte merge multiplexer142; a read-claim data (RCDAT) buffer 156; a reload multiplexer 154; anL2 cache array 140; a cast-out/snoop (CO/SNP) buffer 146; a read-claimfinite state machine (RCFSM) 130; and a cast-out finite state machine(COFSM) 132.

The store queue buffer 124 captures store-through data from the core102. In at least one embodiment, the buffer 124 includes 8-32 byte (B)sectors, each of which can gather stores to a same physical thirty-twobyte (32B) address region. In at least one embodiment, up to foursectors can ‘cluster’ when they are in the same 128B cache-line region.In the disclosed embodiment, the multiplexer 142 is configured to mergeL2 cache hit data with store data provided by the store queue buffer124. The RCDAT buffer 156 is configured to selectively capture L2 cachehit data, system bus input data, etc. For loads, the RCDAT buffer 156collects L2 cache hit data for redelivery of the L2 cache hit data tothe core reload bus. For stores, the RCDAT buffer 156 collects the storedata provided by the store queue buffer 124 and merges in L2 cache hitdata. The reload multiplexer 154 multiplexes L2 cache hit data and datafrom the RCDAT buffer 156 that is being returned to the core 102, viathe core reload bus.

The CO/SNP buffer 146 captures reads of the L2 cache array 140 on behalfof the COFSM 132 and snoop (SNP) finite state machines (not shown) forsubsequent delivery of the data to the system bus. The RCDAT buffer 156captures incoming data to the L2 cache 120 based on requests made by theRCFSM 130. For stores, the buffer 156 also manages the merging of storedata with a cache-line of data from the L2 cache array 140 or the systembus. The buffer 156 is then used to source data to the core 102 (via thecore reload bus) and to the L2 cache array 140 (to complete theinstallation of a cache-line into the L2 cache array 140). The L2 cachearray 140, which includes a directory and a data array, may be, forexample, a 256B 8-way set associative cache structure. The directoryholds a status and tag for each cache-line that is valid in the L2 cachearray 140.

A read-claim address storage (RC addr storage) 126 and a cast-outaddress storage (CO addr storage) 128 are coupled (via a multiplexer) toaddress lines of the system bus. A multiplexer 134 is controlled by DCBQcontrol logic 122 to provide a dispatch pipe address or a combination ofa logical partition identifier (LPID), a thread identifier (TID), a DCBTcontrol type (CT), a function request code (FRC), and a windowidentifier (WIND_ID) as an address for a DCBQ_Req command to an input ofthe storage 128. The DCBQ control logic 122 also controls a multiplexer110 (included in the core 102) to select an appropriate TID. The core102 controls a DCBQ select multiplexer 106 to select associated memorymanagement unit (MMU) information from memory management configurationregisters (MSRs) 109 included in the core configuration registers (CoreConfig Registers) 108 of the core 102 to insert the information into‘byte 0’ of a DCBQ instruction.

When the core 102 issues a DCBQ instruction, the multiplexer 106 iscontrolled by the core 102 to multiplex MMU bits over ‘byte 0’ of theDCBQ instruction. Byte 0 of the DCBQ instruction then corresponds tointernal core configuration register information that is set-up by atrusted kernel. Bytes 1-3 of the DCBQ instruction are defined by usercode as part of the DCBQ instruction. To convert the DCBQ instructioninto a DCBQ_Req command on the system bus, the L2 cache 120 builds theaddress (addr), transfer type (ttype), and address extension (add_ext)fields for the DCBQ_Req command. The L2 cache 120 builds the DCBQ_Reqcommand by extracting portions of a data packet along with additionalconfiguration registers from the core (i.e., LPID and TID, which canonly be modified by a trusted kernel). The RCSFM 130 treats the DCBQinstruction as a normal store in terms of gaining ownership of anassociated cache-line and committing 4-bytes associated with a DCBQinstruction to a cache-line. Once, completed, the RCSFM 130 initiatesthe COFSM 132 to perform a DCBQ_Req command for the cache-line on whichthe RCSFM 130 is working.

To make the operation ‘atomic’, the RCSFM 130 protects the cache-line(associated with the DCBQ instruction) until the COSFM 132 completes theDCBQ_Req command on the system bus. The COFSM 132 loads the address theRCFSM 130 is working on and based on an indication that the address isassociated with a DCBQ_Req command, the COSFM 132 requests that thecache-line be read from the L2 cache array 140 and routed to the CO/SNPbuffer 146. While the cache-line is being routed and stored in thebuffer 146, CO control logic in the COFSM 132 copies bytes 1-3 of thecache-line into the CO address storage 128 in a format that isdesignated for the DCBQ_Req command. At substantially the same time, theDCBQ control logic 122 extracts (from the core 102) the LPID and TIDwhich are also loaded into the CO address storage 128.

When the DCBQ_Req command address information is loaded, the COFSM 132issues a DCBQ_Req command on the system bus to a targeted slave(functional unit (FU)). When the DCBQ_Req command is accepted by thetargeted FU, the cache-line of data payload is sent to the targeted FUand the COFSM 132 goes idle. When the RCFSM 130 detects that the COFSM132 has sent the DCBQ_Req command and the data associated with theDCBQ_Req command, the RC goes idle and stops protecting the cache-lineaddress associated with the DCBQ_Req command. While a COFSM has beendescribed herein as building a DCBQ_Req command, it should beappreciated that a different FSM or a dedicated FSM may be implementedto build a DCBQ_Req command.

With reference to FIG. 2, a process 200 for processing a DCBQinstruction, according to an embodiment of the present disclosure, isillustrated. In block 202, the process 200 is initiated. Next, indecision block 204, the L2 cache 120 determines whether a store-typeinstruction has been received from the core 102. When the L2 cache 120does not receive a store-type instruction, control loops on block 204.In block 204, when the L2 cache 120 receives a store-type instruction,control transfers to block 206. In block 206, the RCFSM 130 isdispatched to process the store-type instruction. Next, in block 208,the RCFSM 130 gains ownership of a cache-line associated with thestore-type instruction and merges store data into the cache-line andstores the cache-line (with the merged store data) in the L2 cache array140. Then, in decision block 210, the L2 cache 120 determines whetherthe store-type instruction is a DCBQ instruction (e.g., by examining anoperational code for the store-type instruction). When the store-typeinstruction is not a DCBQ instruction, control transfers from block 210to block 204. When the store-type instruction is a DCBQ instruction,control transfers from block 210 to block 212.

In block 212, the RCFSM 130 requests the COFSM 132 to initiate aDCBQ_Req command. Next, in block 214, the COFSM 132 triggers a read ofan L2 cache-line (associated with the DCBQ instruction) to cause DCBQheader information to be merged into the cache-line. Then, in block 216,the COFSM 132 initiates a DCBQ_Req command on the system bus. Next, indecision block 218, the COFSM 132 determines whether the DCBQ_Reqcommand was accepted by a designated target. If the DCBQ_Req command wasnot accepted in block 218, control transfers from block 218 to block216. If the DCBQ_Req command was accepted in block 218, controltransfers from block 218 to block 220. In block 220, the COFSM 132initiates a DCBQ_Req data packet (payload) transfer to the designatedtarget. Next, in block 222, the COFSM 132 provides an indication to theRCFSM 130 that the DCBQ data payload has been transferred. Then, inblock 224, the RCFSM 130 stops protecting the cache-line and the RCFSM130 and the COFSM 132 go idle until another DCBQ instruction is receivedor an other operation is initiated.

With reference to FIG. 3, a flow 300 illustrates an example sequence forconverting a DCBQ instruction to a DCBQ_Req command for communicationbetween a thread of user code and a functional unit (FU), e.g., a hostfabric interface (HFI) that forwards, sends, and receives packets from anetwork or a coprocessor. Initially, at 302, a trusted kernel (i.e., ahypervisor or an operating system (OS)), executing on core 301, performsa memory mapped input/output (MMIO) write to a context table (in an FU303) to set-up authorization information for the user thread (which isexecuting one or more DCBQ instructions) in the FU 303. The trustedkernel configures the FU 303 to accept DCBQ_Req commands (from an L2cache) associated with DCBQ instructions of the user thread. At 304,user code creates a message, for example, via normal stores into acache-line (which is private user space for the user thread) for whichthe trusted kernel has previously set-up permissions. Then, in block306, a helper thread (running on a same or a different processor core asthe user thread) may be employed to build network packets or controlblocks for multiple user threads.

Next, at 308, the L2 cache receives the DCBQ instruction which triggersthe L2 cache to build a DCBQ_Req packet and send the packet to the FU303 via the system bus. Then, at 310, the FU 303 reads and compares theLPID and TID with an appropriate entry in an associated context table,which was previously initialized by the trusted kernel (to ensure thatthe thread has permission to perform an operation associated with thecommand). According to one embodiment, the FU 303 utilizes a windowidentifier (Wind_ID) that is included in the DCBQ_Req packet to indexinto the associated context table to perform an authorization check onan associated context table entry (i.e., LPID/TID) to determine whetherthe thread is authorized. At 312, a memory management unit (MMU) 305 ofthe FU 303, if required (e.g., when the packet is a coprocessor packet),is utilized to convert EAs to an RAs.

The FU 303 extracts FRC information from the DCBQ_Req command packet todetermine a function type for a coprocessor that is to work on the dataor a network device that is to build a network packet that is to berouted via a network to a designated receiving unit. At 314, the FU 303sends a network packet over a network. When a receiving unit receivesthe network packet, the receiving unit compares the LPID and TID withentries in an associated context table (e.g., that was initialized bythe trusted kernel) to ensure that the thread is permitted to performdesignated operations. The receiving unit may also employ an MMU toperform EA to RA translation, if needed. When an FU includes acoprocessor, the coprocessor may be configured to interpret a receivedcontrol block packet and execute an associated task on a data payload.In this case, the coprocessor then writes completion status as definedin control block packet.

With reference to FIGS. 4A-4B, a process 400 for converting a DCBQinstruction to a DCBQ_Req command is illustrated. The process 400 isinitiated at block 402, at which point control transfers to decisionblock 404. In block 404, user code requests a DCBQ channel connection(for an associated user thread) from a trusted kernel. Upon receivingthe request in decision block 406, the trusted kernel checks an internaltable to ascertain whether the user thread is allowed a channelconnection. If the channel connection is not allowed, control transfersfrom block 406 to block 408. In block 408, the trusted kernel informsthe user code that the request for a channel connection is not allowed.If the channel connection is allowed, control transfers from block 406to block 410. In block 410, the trusted kernel does a write (e.g., amemory mapped input/output (MMIO) write) to a context table of anappropriate FU to set-up authorization for the FU to communicate withthe user thread. Next, in block 412, the trusted kernel informs the usercode that the channel has been initialized.

Then, in block 414, the user code sets up a DCBQ block payload and theninitiates a DCBQ instruction to trigger a DCBQ_Req. Next, in block 416,the L2 cache processes the DCBQ_Req and builds a DCBQ_Req packet with aheader using LPID/TID information that is unique to the thread. Then, inblock 418, the L2 cache sends the DCBQ_Req command across the system busto the FU. Next, in block 420, the FU extracts the DCBQ headerinformation to check for authorization. Then, in decision block 422, theFU determines whether the thread is authorized (i.e., the FU readspermissions in a context table to determine if an LPID/TID for the userthread was previously written to the context table by a trusted kernel).If the thread is not authorized to use the FU, control transfers fromblock 422 to block 424, where the FU sets a status register indicatingan unauthorized DCBQ_Req attempt. If the thread is authorized to use theFU, control transfers from block 422 to block 426, where the FU extractsDCBQ information to build a network packet (or process a control block).Next, in block 428, when a network packet is indicated, the FU sends thenetwork packet to a receiving unit, via a network. Then, in block 430,the FU sets a status register indicating completion of the DCBQinstruction. Following blocks 408, 424, and 430, control returns toblock 404 while the process 400 is active.

With reference to FIG. 5, a format for a DCBQ_Req packet 500 and aformat definition table 502, configured according to one embodiment ofthe present disclosure, are illustrated. As is shown, an address (Addr)for the DCBQ_Req packet includes: an LPID, a TID, a CT, a Wind_ID, andan FRC. In this embodiment, the FRC is taken from byte 2 and byte 3 ofthe DCBQ cache-line and the CT is taken from byte 1 of the DCBQcache-line. The CT indicates a given FU and the FRC indicates which unitor function within the FU is to process the DCBQ_Req command. As notedabove, the TID and the LPID (which are written to core configurationregisters by a trusted kernel) are extracted from the registers. A ttypeis set to a DCBQ_Req system bus encoding when a ttype of a store-typeinstruction corresponds to a DCBQ_Req ttype. A data packet for aDCBQ_Req command may include MMU information, a CT, a Wind_ID, an FRC,and a data payload. As noted above, the MMU information corresponds tocore MSR information that is multiplexed into byte 0 of a DCBQ store bya core. As noted above, byte 0 of the DCBQ store is later merged with anassociated DCBQ cache-line.

Accordingly, techniques have been disclosed herein that readilyfacilitate the triggering of a data block move using a system bus writecommand (initiated by user code) while maintaining permission controls.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises,”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below, if any, areintended to include any structure, material, or act for performing thefunction in combination with other claimed elements as specificallyclaimed. The description of the present invention has been presented forpurposes of illustration and description, but is not intended to beexhaustive or limited to the invention in the form disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the invention.The embodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Having thus described the invention of the present application in detailand by reference to preferred embodiments thereof, it will be apparentthat modifications and variations are possible without departing fromthe scope of the invention defined in the appended claims.

1. A method of triggering a system bus write command with user code,comprising: identifying a specific store-type instruction in a userinstruction sequence; converting the specific store-type instructioninto a specific request-type command, wherein the specific request-typecommand is configured by hardware to include core permission controlsthat are stored in core configuration registers of a processor core anduser created data stored in a cache memory; and transmitting, from thecache memory, the specific request-type command via a system bus,wherein the core permission controls dictate whether slave devicesreceiving the specific request-type command via the system bus are ableto process the specific request-type command.
 2. The method of claim 1,further comprising: writing, by a trusted kernel, the core permissioncontrols to the core configuration registers.
 3. The method of claim 2,further comprising: writing, by the trusted kernel, slave permissioncontrols to a context table of a slave device.
 4. The method of claim 3,further comprising: receiving, by the slave device, the specificrequest-type command via the system bus; and processing, by the slavedevice, the specific request-type command when the slave permissioncontrols stored in the context table of the slave device are the same asthe core permission controls included in the specific request-typecommand.
 5. The method of claim 1, wherein the specific request-typecommand has an associated data payload, and wherein the data payloadcorresponds to one or more network packets for a network device toforward out on a communication network.
 6. The method of claim 1,wherein the specific request-type command has an associated datapayload, and wherein the data payload corresponds to control blocks fora coprocessor or direct memory access engine.
 7. The method of claim 1,wherein the transmitting further comprises: transmitting, from the cachememory, a data payload associated with the specific request-type commandvia the system bus, wherein a cache-line associated with the specificrequest-type command is protected to ensure the cache-line is notmodified until transfer of the associated data payload to a slave devicecoupled to the system bus is complete.
 8. A processor system,comprising: a processor core; a cache memory coupled to the processorcore, wherein the processor core and the cache memory are configured to:identify a specific store-type instruction in a user instructionsequence; convert the specific store-type instruction into a specificrequest-type command, wherein the specific request-type command isconfigured to include core permission controls that are stored in coreconfiguration registers of the processor core by a trusted kernel anduser created data stored in the cache memory; and transmit, from a cachememory, the specific request-type command via a system bus; and slavedevices coupled to the system bus, wherein the slave devices areconfigured through respective register space that is only accessible bythe trusted kernel with respective slave permission controls, andwherein the slave devices process the specific request-type command onlywhen the core permission controls are the same as the respective slavepermission controls.
 9. The processor system of claim 8, wherein thetrusted kernel is included in a hypervisor.
 10. The processor system ofclaim 9, wherein the trusted kernel is included in an operating system.11. The processor system of claim 8, wherein the trusted kernel writesthe slave permission controls to the slave devices using memory-mappedinput/output writes.
 12. The processor system of claim 8, wherein thespecific request-type command has an associated data payload, andwherein the data payload corresponds to one or more network packets fora network device to forward out on a communication network.
 13. Theprocessor system of claim 8, wherein the specific request-type commandhas an associated data payload, and wherein the data payload correspondsto control blocks for a coprocessor or direct memory access engine. 14.The processor system of claim 8, wherein the cache memory is furtherconfigured to transmit a data payload associated with the specificrequest-type command via the system bus, and wherein a cache-lineassociated with the specific request-type command is protected to ensurethe cache-line is not modified until transfer of the associated datapayload to one of the slave devices is complete.
 15. A method oftriggering a system bus write command with user code, comprising:identifying a specific store-type instruction in a user instructionsequence; converting the specific store-type instruction into a specificrequest-type command, wherein the specific request-type command isconfigured to include core permission controls that are stored in coreconfiguration registers of a processor core and user created data storedin a cache memory; transmitting, from the cache memory, the specificrequest-type command via a system bus; receiving, by a slave devicecoupled to the system bus, the specific request-type command; andprocessing, by the slave device, the specific request-type command whenslave permission controls stored in a context table of the slave deviceare the same as the core permission controls included in the specificrequest-type command.
 16. The method of claim 15, further comprising:writing, by a trusted kernel, the core permission controls to the coreconfiguration registers.
 17. The method of claim 16, further comprising:writing, by the trusted kernel, the slave permission controls to thecontext table of the slave device.
 18. The method of claim 15, whereinthe specific request-type command has an associated data payload, andwherein the data payload corresponds to one or more network packets fora network device to forward out on a communication network.
 19. Themethod of claim 15, wherein the specific request-type command has anassociated data payload, and wherein the data payload corresponds tocontrol blocks for a coprocessor or direct memory access engine.
 20. Themethod of claim 15, wherein the transmitting further comprises:transmitting, from the cache memory, a data payload associated with thespecific request-type command via the system bus, wherein a cache-lineassociated with the specific request-type command is protected to ensurethe cache-line is not modified until transfer of the associated datapayload to the slave device is complete.